﻿@model  HomeControllerModel.Index
<div class="page">
    <div class="pageHeader">
        <form id="pagerForm" onsubmit="return navTabSearch(this);" action="/user" method="post">
        <div class="searchBar">
            <ul class="searchContent">
                <li>
                    <label>
                        Id/Guid/用户名：</label>
                    <input name="Keyword" type="text" maxlength="36" value="@Model.Keyword" />
                </li>
                <li>
                    <label>
                        状 态：
                    </label>
                    <select name="Status">
                        <option value="" @(!Model.Status.HasValue ? "selected=selected" : string.Empty)>请选择</option>
                        <option value="True" @(Model.Status.HasValue && Model.Status.Value ? "selected=selected" : string.Empty)>
                            正常</option>
                        <option value="False" @((Model.Status.HasValue && !Model.Status.Value) ? "selected=selected" : string.Empty)>
                            锁定</option>
                    </select>
                </li>
            </ul>
            <div class="subBar">
                <ul>
                    <li>
                        <div class="buttonActive">
                            <div class="buttonContent">
                                <button type="submit">
                                    检索</button>
                            </div>
                        </div>
                    </li>
                </ul>
            </div>
        </div>
        </form>
    </div>
    <div class="PageContent">
        <div class="panelBar">
            <ul class="toolBar">
                <li><a class="edit" href="/user/home/detail/{param}" target="dialog" title="详细信息"
                    mask="true" width="830" height="550" onclick="javascript:void(0);"><span>详细信息</span></a></li>
            </ul>
        </div>
        <table class="table" layouth="138" width="100%">
            <thead>
                <tr>
                    <th width="60" align="center">
                        Id
                    </th>
                    <th width="300">
                        Guid
                    </th>
                    <th>
                        用户名
                    </th>
                    <th width="100">
                        昵 称
                    </th>
                    <th width="200">
                        绑定邮箱
                    </th>
                    <th width="200">
                        绑定手机
                    </th>
                    <th width="150">
                        角 色
                    </th>
                    <th width="100">
                        等 级
                    </th>
                    <th width="120">
                        限 制
                    </th>
                    <th width="200">
                        许 可
                    </th>
                    <th width="80">
                        状态
                    </th>
                </tr>
            </thead>
            <tbody>
                @foreach (var o in Model.Users)
                {
                    <tr target="param" rel="@o.Id">
                        <td>@o.Id
                        </td>
                        <td>@o.Guid
                        </td>
                        <td>@o.Name
                        </td>
                        <td>@o.NickName
                        </td>
                        <td>
                            @o.Email
                        </td>
                        <td>
                            @o.Mobile
                        </td>
                        <td>@o.Role
                        </td>
                        <td>@o.Level
                        </td>
                        <td>
                            @o.Limit
                        </td>
                        <td>@o.Permission
                        </td>
                        <td>
                            @(o.Status?"正常":"锁定")
                        </td>
                    </tr>
                }
            </tbody>
        </table>
    </div>
</div>
